package com.woniu.service.impl;

import com.woniu.entity.VaTask;
import com.woniu.entity.dto.VaResultDTO;
import com.woniu.entity.dto.VaResultParticularsDTO;
import com.woniu.mapper.EvaluatTaskResultMapper;
import com.woniu.service.EvaluatTaskResultService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EvaluatTaskResultServiceImpl implements EvaluatTaskResultService {
    @Autowired
    private EvaluatTaskResultMapper evaluatTaskResultMapper;
    //查询全部的作业
    @Override
    public List<VaTask> findAllTask() {
        List<VaTask> allTask = evaluatTaskResultMapper.selectList(null);
        return allTask;
    }
    //查询所有作业结果
    @Override
    public List<VaResultDTO> findAllTaskResult(Integer taskId) {
        List<VaResultDTO> allTaskResult =evaluatTaskResultMapper.findAllTaskResult(taskId);
        return allTaskResult;
    }
    //通过作业结果id查询作业详情
    @Override
    public VaResultParticularsDTO findTaskResultParticulars(Integer resultId) {
        VaResultParticularsDTO VaResultParticular = evaluatTaskResultMapper.findTaskResultParticulars(resultId);
        return VaResultParticular;
    }
}
